package com.atguigu.srb.sms.feign.fallback;

import com.atguigu.common.results.R;
import com.atguigu.common.results.ResultCodeEnum;
import com.atguigu.srb.sms.feign.ServiceCoreClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
//兜底方案：必须实现feign客户端接口 为每个方法提供兜底方案
@Component
@Slf4j
public class CoreClientFallback implements ServiceCoreClient {


    @Override
    public R isRegisted(String mobile) {
        log.error("远程调用手机号唯一校验失败:{}",mobile);
        return R.setResult(ResultCodeEnum.ALIYUN_SMS_NET_ERROR);
    }

    @Override
    public R test1(R r) {
        return null;
    }

    @Override
    public R test2(String username, String password) {
        return null;
    }

    @Override
    public R test3(R r) {
        return null;
    }
}
